#ifndef __PLAYER_BG_H__
#define __PLAYER_BG_H__

#include <rtthread.h>

enum
{
	MSG_DEC_START_GET_INFO=0,
	MSG_DEC_PLAY,		
	MSG_DEC_STOP,	
	MSG_DEC_NEXT,	
	MSG_DEC_PREV,	
	MSG_DEC_FF,	
	MSG_DEC_FR,	
	MSG_DEC_FILL_BUFFER,
	MSG_DEC_INIT_FLIST,
	MSG_DEC_START_DECODE,
};

enum
{
	STA_DEC_STOP=0,
	STA_DEC_PAUSE,
	STA_DEC_PLAY,	
	STA_DEC_PREV,
	STA_DEC_NEXT,
	STA_DEC_FF,
	STA_DEC_FR,
	STA_DEC_AUTO_NEXT,
};

enum
{
	JOINT_STEREO=0,
	SINGAL_CHANNEL,
	DUAL_CHANNEL,
	STEREO,
};

void decoder_mb_reset(void);
void decoder_send_mb(rt_uint32_t e);

rt_uint16_t decoder_get_bitrate(void);
rt_uint8_t decoder_get_channel(void);
rt_uint16_t decoder_get_samplerate(void);
rt_uint32_t decoder_get_current_time(void);
rt_uint32_t decoder_get_total_time(void);
rt_uint8_t decoder_get_status(void);
void decoder_set_status(rt_uint8_t status);
rt_uint32_t decoder_get_fpos(void);

void player_dec_bg_tid_init(void);
void player_dec_bg_tid_exit(void);
void player_dec_svr_tid_resume(void);
void player_dec_svr_tid_suspend(void);
void player_dec_bg_tid_resume(void);
void player_dec_bg_tid_suspend(void);
void player_dec_tid_resume(void);
void player_dec_tid_suspend(void);
void playerbg_bg_init(void);

#endif
